X = digittrain_dataset;
%%
hiddenSize = 25;
autoenc = trainAutoencoder(X,hiddenSize,...
        'L2WeightRegularization',0.004,...
        'SparsityRegularization',4,...
        'SparsityProportion',0.15);
%%
x = digittest_dataset;
%%
xReconstructed = predict(autoenc,x);
%%
figure;
for i = 1:20
    subplot(4,5,i);
    imshow(X{i});
end